class Base::Session
  class << self

    def rails_test?
      Rails.env!='production'
    end

    def set_user(user)
      Thread.current[:user_id] = user.id
      Thread.current[:user] = user
      Thread.current[:customer_id] = user.customer_id
      Thread.current[:customer] = user.customer
    end

    def current_user
      Thread.current[:user]
    end

    def current_user_id
      Thread.current[:user_id]
    end

    def current_customer
      Thread.current[:customer]
    end

    def current_customer_id
      Thread.current[:customer_id]
    end


  end
end
